//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package cn.intotw.rdcj.core.config.mybatis.entity;

import java.io.Serializable;
import java.util.List;

public class Page<T> implements Serializable {
    private int total_count;
    private int page_no;
    private int page_size;
    private int total_page;
    private List<T> rows;

    public Page() {
    }

    public int getTotal_count() {
        return this.total_count;
    }

    public void setTotal_count(int total_count) {
        this.total_count = total_count;
    }

    public int getPage_no() {
        return this.page_no;
    }

    public void setPage_no(int page_no) {
        this.page_no = page_no;
    }

    public int getPage_size() {
        return this.page_size;
    }

    public void setPage_size(int page_size) {
        this.page_size = page_size;
    }

    public int getTotal_page() {
        return this.total_page;
    }

    public void setTotal_page(int total_page) {
        this.total_page = total_page;
    }

    public int getTotalCount() {
        return this.total_count;
    }

    public void setTotalCount(int totalCount) {
        this.total_count = totalCount;
    }

    public int getPageNo() {
        return this.page_no;
    }

    public void setPageNo(int pageNo) {
        this.page_no = pageNo;
    }

    public int getPageSize() {
        return this.page_size;
    }

    public void setPageSize(int pageSize) {
        this.page_size = pageSize;
    }

    public int getTotalPage() {
        return this.total_page;
    }

    public void setTotalPage(int totalPage) {
        this.total_page = totalPage;
    }

    public List<T> getRows() {
        return this.rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public T getRow(int i) {
        return this.rows != null ? this.rows.get(i) : null;
    }

    public T getFirstRow() {
        return this.isEmpty() ? null : this.getRow(0);
    }

    public T getLastRow() {
        return this.getRow(this.rows == null ? 0 : this.rows.size() - 1);
    }

    public boolean isEmpty() {
        return this.rows == null || this.rows.size() == 0;
    }

    public String toString() {
        return "Page{total_count=" + this.total_count + ", page_no=" + this.page_no + ", page_size=" + this.page_size + ", total_page=" + this.total_page + ", rows=" + this.rows + '}';
    }
}
